package com.example.rocketdemo.consumer;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.ConsumeMode;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * @author GuoAo
 * @className LogConsumer
 * @date 2025/6/24
 * @description TODO
 */
@Component
@RocketMQMessageListener(topic = "log-topic",consumerGroup = "log-consumer-group",selectorExpression = "other",consumeMode = ConsumeMode.ORDERLY)
@Slf4j
public class LogConsumer implements RocketMQListener<String> {


    @Override
    public void onMessage(String s) {
      log.info("消费消息：{}",s);
    }
}
